1) count the number of files in the current folderLs-L | grep "^-" | WC-l
2) count the number of directories in the current folder
Ls-L | grep "^ d" | WC-l 3) count the number of files in the current folder, includingLs-LR | grep "^-" | WC-l 4)
Count the number of files in a folderLs-l |grep "^-" |wc-lCount the number of directories under a folderLs-l |grep "^d" |wc-lThe number of files under the statistics folder, including subfolders.Ls-lr|grep "^-" |wc-lThe number of directories under
Welcome Reprint! When reproduced, please indicate the source:http://blog.csdn.net/nfer_zhuang/article/details/42582425IntroductionUsage scenarios:My QQ group in the recent chat is in full swing, also led to my QQ buffer folder size in the crazy rise,
How to count the number of files in a directory and the commands for the total number of lines under Linux
The total number of files that know the specified suffix name command:
Find. -name "*.cpp" | Wc-l find
.-maxdepth 1-name "*.sh" |wc-lKnow
To count the number of common files, directory files, and other files in a directory, you must first know which files are in this folder. Then, you can determine which files are common files, directory files, or other file types. In fact, you can
Count the number of
HDFs files, less than the number of 20M files Hadoop fs-du-h/# statistics File size Hadoop fs-count/# Statistics file number, returned data is directory number, number of files, file total size, input path Hadoop
Counts the number of files in the current folder, including subfoldersLs-lr|grep "^-" |wc-lThe number of directories under the statistics folder, including the sub-foldersLs-lr|grep "^d" |wc-lCount the number of files in the current folderLs-l |grep
Linux Command to view the number of files in a folder-general Linux technology-Linux programming and kernel information. The following is a detailed description. View the number of files in a folder
Ls-l | grep "^-" | wc-l
Or
Find./company-type
1. Count the number of files in the current folderLs-l |grep "^-" |wc-l2 . Count the number of directories under the current folderLs-l |grep "^d" |wc-l3. count the number of files in the current folder, including subfoldersLs-lr|grep "^-" |wc-l4.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.